//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { SmsTemplate, SmsTemplateResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooSmsTemplateList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<SmsTemplateResponse>(`/uctoo/sms_template/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooSmsTemplate = async (id: string) => {
  return requestClient.get<SmsTemplate>(`/uctoo/sms_template/${id}`);
};

export const adductooSmsTemplate = async (data: Partial<SmsTemplate>) => {
  return requestClient.post<SmsTemplate>('/uctoo/sms_template/add', data);
};

export const edituctooSmsTemplate = async (data: Partial<SmsTemplate>) => {
  return requestClient.post<SmsTemplate>('/uctoo/sms_template/edit', data);
};

export const deleteuctooSmsTemplate = async (id: string) => {
  return requestClient.post<any>('/uctoo/sms_template/del', { id });
};
